home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / mac / files / t_sys5 / 92052tar.gz / 920528.tar / bootp.h < prev    next >
C/C++ Source or Header  |  1991-06-18  |  3KB  |  74 lines

  1. /* @(#) $Header: bootp.h,v 1.1 91/06/18 17:28:28 deyke Exp $ */
  2.  
  3. /*************************************************/
  4. /* Center for Information Technology Integration */
  5. /*           The University of Michigan          */
  6. /*                    Ann Arbor                  */
  7. /*                                               */
  8. /* Dedicated to the public domain.               */
  9. /* Send questions to info@citi.umich.edu         */
  10. /*                                               */
  11. /* BOOTP is documented in RFC 951 and RFC 1048   */
  12. /*************************************************/
  13.  
  14. #ifndef BOOTREQUEST
  15. #include "socket.h"
  16.  
  17. struct bootp {
  18.     char    op;                     /* packet opcode type */
  19.     char    htype;                  /* hardware addr type */
  20.     char    hlen;                   /* hardware addr length */
  21.     char    hops;                   /* gateway hops */
  22.     int32   xid;                    /* transaction ID */
  23.     int16   secs;                   /* seconds since boot began */
  24.     int16   unused;
  25. /*      struct in_addr  ciaddr;         /* client IP address */
  26. /*      struct in_addr  yiaddr;         /* 'your' IP address */
  27. /*      struct in_addr  siaddr;         /* server IP address */
  28. /*      struct in_addr  giaddr;         /* gateway IP address */
  29.     char    chaddr[16];             /* client hardware address */
  30.     char    sname[64];              /* server host name */
  31.     char    file[128];              /* boot file name */
  32.     char    vend[64];               /* vendor-specific area */
  33. };
  34.  
  35. /*
  36.  * UDP port numbers, server and client.
  37.  */
  38. #define IPPORT_BOOTPS           67
  39. #define IPPORT_BOOTPC           68
  40.  
  41. #define BOOTREQUEST             1
  42. #define BOOTREPLY               2
  43.  
  44. #define BOOTP_PAD               0
  45. #define BOOTP_SUBNET            1
  46. #define BOOTP_GATEWAY           3
  47. #define BOOTP_DNS               6
  48. #define BOOTP_HOSTNAME          12
  49. #define BOOTP_END               0xff
  50.  
  51. /*
  52.  * "vendor" data permitted for Stanford boot clients.
  53.  */
  54. struct vend {
  55.     unsigned char  v_magic[4];     /* magic number */
  56.     unsigned long  v_flags;        /* flags/opcodes, etc. */
  57.     unsigned char  v_unused[56];   /* currently unused */
  58. };
  59.  
  60. #define VM_STANFORD     "STAN"  /* v_magic for Stanford */
  61.  
  62. /* v_flags values */
  63. #define VF_PCBOOT       1       /* an IBMPC or Mac wants environment info */
  64. #define VF_HELP         2       /* help me, I'm not registered */
  65.  
  66. extern int WantBootp;
  67. extern char bp_ascii[];
  68.  
  69. void bootp_print_packet __ARGS((struct bootp *bp));
  70. int bootp_validPacket __ARGS((struct ip *ip,struct mbuf **bpp));
  71.  
  72. #endif
  73.  
  74.